// 商品相关请求
import http from '../src/utils/http';
import { selectGoodsType } from '../src/utils/types';

//获取所有商品列表
export const getGoods = (param?: selectGoodsType) => {
    // const {} = params
    return http.get(`/goods`, { params: param })
}

//根据状态获取商品
export const getGoodsByStatus = (state: number) => {
    return http.get(`/goods${state}`)
}

//添加商品
export const addGoods = (params: selectGoodsType) => {
    return http.post('/goods', params)
}